2022年12月9日 — I am struggling with writing a test for my go lambda function with sqlmock and gorm. This is the function I want to test: func DoCleanup(con * ...
2023年3月13日 — The key here to mock the database is sqlmock.New() this will represent the mock database and interact with Gorm. You can extend the result to ...
2023年9月27日 — SQLMock provides a way to mock out your SQL database so you can test your GORM code without needing a live database. In this blog post, we will ...